<%@ include file="/taglibs.jsp"%>
<jsp:directive.page import="java.util.Random"/>
<jsp:directive.page import="java.util.Date"/>

<title>Winter War - Full Event Listing</title>

<c:forEach var="slot" items="${slots}">
	<div class="slotHeader">&nbsp;&nbsp;Session ${slot.slotName} ${slot.startDateHour } ${slot.startDateAMPM } - ${ slot.endDateHour} ${slot.endDateAMPM } </div>
	<h3>Board Game Events</h3>
	<table width="100%">
		<thead>
			<tr>
				<th><bean:message key="event.eventName"/></th>
				<th><bean:message key="event.runner"/></th>
				<th><bean:message key="event.rules"/></th>
				<th><bean:message key="event.totalSeats"/></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="event" items="${slot.events }">
				<c:choose>
					<c:when test="${event.status == 3 && event.eventType == 1}">
						<tr>
							<td style="border-bottom:1px solid #C0C0C0;"><a href="event.do?method=edit&eventID=${event.eventID }&conID=${conID }">${event.eventName } - ${event.tableName }</a></td>
							<td style="border-bottom:1px solid #C0C0C0;">${event.user.firstName } ${event.user.lastName }</td>
							<td style="border-bottom:1px solid #C0C0C0;font-size:10pt">
								${event.rules }
							</td>
							<c:choose>
								<c:when test="${event.status == 1 }"><td>${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 2 }"><td>${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 3 }"><td>${event.reservedSeats} / ${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 4 }"><td>${event.totalSeats}</td></c:when>
							</c:choose>
						</tr>
					</c:when>
				</c:choose>
			</c:forEach>
		</tbody>
	</table>

	<h3>Card Game Events</h3>
	<table width="100%">
		<thead>
			<tr>
				<th><bean:message key="event.eventName"/></th>
				<th><bean:message key="event.runner"/></th>
				<th><bean:message key="event.rules"/></th>
				<th><bean:message key="event.totalSeats"/></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="event" items="${slot.events }">
				<c:choose>
					<c:when test="${event.status == 3 && event.eventType == 2}">
						<tr>
							<td style="border-bottom:1px solid #C0C0C0;"><a href="event.do?method=edit&eventID=${event.eventID }&conID=${conID }">${event.eventName } - ${event.tableName }</a></td>
							<td style="border-bottom:1px solid #C0C0C0;">${event.user.firstName } ${event.user.lastName }</td>
							<td style="border-bottom:1px solid #C0C0C0;font-size:10pt">
								${event.rules }
							</td>
							<c:choose>
								<c:when test="${event.status == 1 }"><td>${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 2 }"><td>${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 3 }"><td>${event.reservedSeats} / ${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 4 }"><td>${event.totalSeats}</td></c:when>
							</c:choose>
						</tr>
					</c:when>
				</c:choose>
			</c:forEach>
		</tbody>
	</table>
	<h3>Miniatures Events</h3>
	<table width="100%">
		<thead>
			<tr>
				<th><bean:message key="event.eventName"/></th>
				<th><bean:message key="event.runner"/></th>
				<th><bean:message key="event.rules"/></th>
				<th><bean:message key="event.totalSeats"/></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="event" items="${slot.events }">
				<c:choose>
					<c:when test="${event.status == 3 && event.eventType == 3}">
						<tr>
							<td style="border-bottom:1px solid #C0C0C0;"><a href="event.do?method=edit&eventID=${event.eventID }&conID=${conID }">${event.eventName } - ${event.tableName }</a></td>
							<td style="border-bottom:1px solid #C0C0C0;">${event.user.firstName } ${event.user.lastName }</td>
							<td style="border-bottom:1px solid #C0C0C0;font-size:10pt">
								${event.rules }
							</td>
							<c:choose>
								<c:when test="${event.status == 1 }"><td>${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 2 }"><td>${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 3 }"><td>${event.reservedSeats} / ${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 4 }"><td>${event.totalSeats}</td></c:when>
							</c:choose>
						</tr>
					</c:when>
				</c:choose>
			</c:forEach>
		</tbody>
	</table>
	<h3>Role Playing Events</h3>
	<table width="100%">
		<thead>
			<tr>
				<th><bean:message key="event.eventName"/></th>
				<th><bean:message key="event.runner"/></th>
				<th><bean:message key="event.rules"/></th>
				<th><bean:message key="event.totalSeats"/></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="event" items="${slot.events }">
				<c:choose>
					<c:when test="${event.status == 3 && event.eventType == 4}">
						<tr>
							<td style="border-bottom:1px solid #C0C0C0;"><a href="event.do?method=edit&eventID=${event.eventID }&conID=${conID }">${event.eventName } - ${event.tableName }</a></td>
							<td style="border-bottom:1px solid #C0C0C0;">${event.user.firstName } ${event.user.lastName }</td>
							<td style="border-bottom:1px solid #C0C0C0;font-size:10pt">
								${event.rules }
							</td>
							<c:choose>
								<c:when test="${event.status == 1 }"><td>${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 2 }"><td>${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 3 }"><td>${event.reservedSeats} / ${event.totalSeats}</td></c:when>
								<c:when test="${event.status == 4 }"><td>${event.totalSeats}</td></c:when>
							</c:choose>
						</tr>
					</c:when>
				</c:choose>
			</c:forEach>
		</tbody>
	</table>
</c:forEach>